﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Google.YouTube;

namespace YoutubeGetter
{
    public partial class LoginForm : Form
    {
        public Boolean isLoggedIn { get; private set; }
        
        public LoginForm()
        {
            InitializeComponent();
        }

        private void btnLogin_Click(object sender, EventArgs e)
        {
            String userName = txtUsername.Text;
            String passWord = txtPassword.Text;
            YouTubeRequestSettings settings = new YouTubeRequestSettings("YoutubeGetter", YoutubeTools.clientID, YoutubeTools.developerKey, userName, passWord);
            YouTubeRequest request = new YouTubeRequest(settings);
            YoutubeTools.request = request;
            isLoggedIn = true;
            this.Close();
        }
    }
}
